var t = require;
var e = module;
var o = exports;
var Adv_skd=require("./Adv_skd");
var n =
    (this && this.__extends) ||
    (function() {
        var t = function(e, o) {
            return (t =
                Object.setPrototypeOf ||
                ({ __proto__: [] }
                    instanceof Array &&
                    function(t, e) {
                        t.__proto__ = e;
                    }) ||
                function(t, e) {
                    for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
                })(e, o);
        };
        return function(e, o) {
            function n() {
                this.constructor = e;
            }
            t(e, o), (e.prototype = null === o ? Object.create(o) : ((n.prototype = o.prototype), new n()));
        };
    })();
Object.defineProperty(o, "__esModule", { value: !0 });
var r = t("View"),
    a = t("Platforms"),
    i = t("mainView"),
    s = t("topBar"),
    c = t("restart"),
    l = require("./删档提示框"),
    u = t("BootConst"),
    p = (function(t) {
        function e() {
            var e = (null !== t && t.apply(this, arguments)) || this;
            return (e.res = "setup"), (e.isMask = !0), (e.zIndex = 2), e;
        }
        return (
            n(e, t),
            (e.prototype.onEnable = function() {
                Adv_skd.default.instance.showInterstitialAd();
                var t = this;
                this.scheduleOnce(function() {
                        try {
                            var e = cc.find("panel/content/联系我们", t.view);
                            a.default.platformCtrl.createFeedbackButton(a.default.getDeviceRect(e));
                        } catch (t) {
                            console.error("联系我们按钮有问题");
                        }
                    }, 0.1),
                    "4399小游戏" == a.default.platformType && (this.find("panel/content/08/zp").active = !1);
            }),
            (e.prototype.onDisable = function() {
                a.default.platformCtrl.destroyFeedbackButton();
            }),
            (e.prototype.onClick = function(t) {
                var e = this;
                switch (t) {
                    case "close":
                        this.hideView();
                        break;
                    case "restart":
                        break;
                    case "分享游戏":
                        a.default.platformCtrl.share(u.dd.setup, function(t) {
                            console.log(t);
                        });
                        break;
                    case "退出游戏":
                        a.default.platformCtrl.exit();
                        break;
                    case "删除存档":
                        a.default.platformCtrl.destroyFeedbackButton(),
                            this.showView(l.default).set(
                                this,
                                function() {
                                    e.hideView(), e.hideView(s.default), e.hideView(i.default), e.showView(c.default);
                                },
                                function() {
                                    try {
                                        var t = cc.find("panel/content/联系我们", e.view);
                                        a.default.platformCtrl.createFeedbackButton(a.default.getDeviceRect(t));
                                    } catch (t) {
                                        console.error("联系我们按钮有问题");
                                    }
                                }
                            );
                }
            }),
            e
        );
    })(r.default);
o.default = p;